package com.hb.trade.server.project.deal.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hb.core.pojo.parent.PageResult;
import com.hb.core.pojo.project.deal.dto.BidCandidateDTO;
import com.hb.core.pojo.project.deal.entity.BidCandidate;
import com.hb.core.pojo.project.deal.entity.BidCandidateSupplier;
import com.hb.core.pojo.project.opening.dto.OpeningBidTenderDTO;

import java.util.List;

/**
 * 中标候选人公示Service
 *
 * @author Lix1ang
 * @date 2021-12-24 14:02:26
 */
public interface BidCandidateService extends IService<BidCandidate> {

    /**
     * @Description: 查询标段最后一次发布中标候选人公示的主键id
     * @Author: zhongdl
     * @Date:2022/1/5 16:02
     * @param sectionId:
     * @return: {@link Long }
     **/
    Long getLastBidCandidateId(Long sectionId);

    /**
     * @Description: 查询标段是否发布过中标候选人公示
     * @Author: zhongdl
     * @Date:2022/1/14 16:50
     * @param sectionId:
     * @return: {@link Long }
     **/
    boolean releaseFlagBySectionId(Long sectionId);

    /**
     * 获取候选人列表 （从开标记录表拉取投标人）
     *
     * @param bidCandidateSupplier
     * @return
     */
    PageResult<OpeningBidTenderDTO> getCandidate(BidCandidateSupplier bidCandidateSupplier);
    /**
     *
     * @Description: 查询需要推送的中标候选人公示列表
     * @Author: zhongdl
     * @Date:2022/2/23 16:23
     * @return: {@link List< BidCandidateDTO> }
     **/
    List<BidCandidateDTO> listPushBidCandidateDTO();

    /**
     * 根据id查询中标候选人详情
     *
     * @author yuezheng
     * @param id
     * @return com.hb.core.pojo.project.deal.dto.BidCandidateDTO
     * @date 2022/5/7 14:49
     */
    BidCandidateDTO getBidCandidateDTOById(Long id);

    /**
     * @Description: 新增中标候选人公示
     *
     * @author yuezheng
     * @param bidCandidateDTO
     * @return java.lang.Boolean
     * @date 2022/6/25 10:33
     */
    Boolean addCandidate(BidCandidateDTO bidCandidateDTO);

    /**
     * @Description: 修改中标候选人公示
     *
     * @author yuezheng
     * @param bidCandidateDTO
     * @return java.lang.Boolean
     * @date 2022/6/25 10:35
     */
    Boolean updateCandidate(BidCandidateDTO bidCandidateDTO);

    /**
     * @Description: 分页查询中标候选人公示
     *
     * @author yuezheng
     * @param bidCandidateDTO
     * @return com.baomidou.mybatisplus.extension.plugins.pagination.Page<com.hb.core.pojo.project.deal.entity.BidCandidate>
     * @date 2022/6/27 08:45
     */
    Page<BidCandidate> findCandidatePage(BidCandidateDTO bidCandidateDTO);
}
